package com.comum.javahomework420242025.repository;

import com.comum.javahomework420242025.pojo.Area;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface AreaRepository extends JpaRepository<Area, Long> {
    @Query(value = "select * from area where " +
            "name like %:str% or department like %:str% or createtime like %:str% or comment like %:str%",nativeQuery = true)
    Page<Area> selectByStr(String str, Pageable pageable);

}
